package com.study.pojo;

import java.util.Date;
import java.util.List;

/**
 * book的实体类
 * @Author Miss kun
 * @Date 2020/10/6 10:56
 * @Version 1.0
 */
public class Book {

    /**
     * 图书的id
     */
    private Integer id;
    /**
     *图名
     */
    private String title;
    /**
     *书的作者
     */
    private String author;
    /**
     *图书的图片url
     */
    private String image;
    /**
     *图书的内容介绍
     */
    private String book_introduction;
    /**
     *图书的作者介绍
     */
    private String author_introduction;

    /**
     * 图书的类型
     */
    private String type;
    /**
     *图书的出版商
     */
    private String press;
    /**
     *图书的创建的日期
     */
    private Date date;

    /**
     * 图书的点赞次数，来实现排行榜
     */
    private int count;
    /**
     * 一对多，进行连表查询，一本图书可以包含多个章节
     */
    private List<Chapter> chapters;



    public Book() {
    }

    public Book(String title, String author, String image, String book_introduction, String author_introduction, String press, String type) {
        this.title = title;
        this.author = author;
        this.image = image;
        this.book_introduction = book_introduction;
        this.author_introduction = author_introduction;
        this.press = press;
        this.type = type;
    }

    public Book(String title, String author, String type) {
        this.title = title;
        this.author = author;
        this.type = type;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public List<Chapter> getChapters() {
        return chapters;
    }

    public void setChapters(List<Chapter> chapters) {
        this.chapters = chapters;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getBook_introduction() {
        return book_introduction;
    }

    public void setBook_introduction(String book_introduction) {
        this.book_introduction = book_introduction;
    }

    public String getAuthor_introduction() {
        return author_introduction;
    }

    public void setAuthor_introduction(String author_introduction) {
        this.author_introduction = author_introduction;
    }

    public String getPress() {
        return press;
    }

    public void setPress(String press) {
        this.press = press;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", author='" + author + '\'' +
                ", image='" + image + '\'' +
                ", book_introduction='" + book_introduction + '\'' +
                ", author_introduction='" + author_introduction + '\'' +
                ", type='" + type + '\'' +
                ", press='" + press + '\'' +
                ", date=" + date +
                ", chapters=" + chapters +
                '}';
    }
}
